/***************************************************************************
 *   Copyright (C) 2008 by Eduardo Gurgel Pinho                            *
 *   edgurgel@gmail.com                                                    *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 3 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
***************************************************************************/

#ifndef __LIGHT_MATERIAL_H__
#define __LIGHT_MATERIAL_H__

#include <boost/serialization/nvp.hpp>
#include <boost/serialization/version.hpp>

#include "material.h"

#include "common/color.h"

namespace Sirat {

namespace Material {
	
class Light_Material : public Material {	
public:
	Light_Material(const Common::Color& _color,const double _energy);
	Light_Material();
	Light_Material(const Light_Material& _light_material);
	~Light_Material();
	
	void set_color(const Common::Color& _color);
	void set_energy(const double _energy);
	
	Common::Color get_color() const;
	double get_energy() const;
	
	Light_Material& operator=(const Light_Material& _light_material);	

	Material* clone() { return new Light_Material(*this); }
private:
	friend class boost::serialization::access;
	template<class Archive> void serialize(Archive&, const unsigned int);
	
	Common::Color color;
	double energy;
};

template<class Archive> void Light_Material::serialize(Archive& ar, const unsigned int /* file_version */){
	ar  & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Material)
			& BOOST_SERIALIZATION_NVP(color)
			& BOOST_SERIALIZATION_NVP(energy);
}
	
}

}

#endif
